import 'package:kepu/generated/json/base/json_field.dart';
import 'package:kepu/generated/json/plant_list_entity.g.dart';
import 'dart:convert';
export 'package:kepu/generated/json/plant_list_entity.g.dart';

@JsonSerializable()
class PlantListEntity {
	late int code;
	late String msg;
	late PlantListData data;

	PlantListEntity();

	factory PlantListEntity.fromJson(Map<String, dynamic> json) => $PlantListEntityFromJson(json);

	Map<String, dynamic> toJson() => $PlantListEntityToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class PlantListData {
	late List<PlantListDataRecords> records;
	late int total;
	late int size;
	late int current;
	late int pages;

	PlantListData();

	factory PlantListData.fromJson(Map<String, dynamic> json) => $PlantListDataFromJson(json);

	Map<String, dynamic> toJson() => $PlantListDataToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}

@JsonSerializable()
class PlantListDataRecords {
	late int id;
	late String name;
	late String image;
	late String description;
	late String region;
	late String type;

	PlantListDataRecords();

	factory PlantListDataRecords.fromJson(Map<String, dynamic> json) => $PlantListDataRecordsFromJson(json);

	Map<String, dynamic> toJson() => $PlantListDataRecordsToJson(this);

	@override
	String toString() {
		return jsonEncode(this);
	}
}